package com.zs4sdk.activity.login;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

import com.common.library.util.ChannelUtil;
import com.zs4gamesdk.R;
import com.zs4sdk.Zs4GameBase;
import com.zs4sdk.Zs4GameTD;
import com.zs4sdk.activity.Zs4GameBaseActivity;
import com.zs4sdk.entity.Zs4GameData;
import com.zs4sdk.extra.Zs4GameInfo;

/**
 * Created by Administrator on 2018/4/17.
 */

public class Zs4GameLoginSelectActivity extends Zs4GameBaseActivity {
    private Zs4GameSelectLoginProxy mZs4GameSelectLoginProxy;
    //SDK测试
    public static final int APPID = 1000;
    public static final String APPKEY = "0a305ff02845aacdbf9a8dd75c3b8316";

    // 屏幕方向
    public static int APP_SCREEN_ORIENTATION = Zs4GameBase.SCREEN_ORIENTATION_PORTRAIT;    // 竖屏
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        View mainView = LayoutInflater.from(this).inflate(R.layout.zs4game_act_select_login,null);
        setContentView(mainView);
        mZs4GameSelectLoginProxy = new Zs4GameSelectLoginProxy(this,mainView);
        initSDK();
    }

    /**
     * 初始化SDK
     */
    private void initSDK() {

        // 设置屏幕方向
        Zs4GameBase.getInstance().setScreenOrientation(APP_SCREEN_ORIENTATION);
        Zs4GameBase.getInstance().setShowLog(true);

        // app信息
        Zs4GameInfo zs4GameInfo = new Zs4GameInfo(this);
        Zs4GameData.getInstance().setAppId(zs4GameInfo.getAppId());
        Zs4GameData.getInstance().setAppKey(zs4GameInfo.getAppKey());
        String channel= ChannelUtil.getChannel(zs4GameInfo.getCtx());
        Zs4GameTD.InitSDK(zs4GameInfo.getCtx(), channel);
        Zs4GameData.getInstance().setCompany(1);

    }

}
